#ifndef DEVICESUART_H_
#define DEVICESUART_H_


#define USART1_DMA_READ_LENGTH  (2048)
#define USART1_DMA_SEND_LENGTH  (2048)
#define USART2_DMA_READ_LENGTH  (2048)
#define USART2_DMA_SEND_LENGTH  (2048)
#define USART3_DMA_READ_LENGTH  (2048)
#define USART3_DMA_SEND_LENGTH  (2048)
#define USART6_DMA_READ_LENGTH  (2048)
#define USART6_DMA_SEND_LENGTH  (2048)



extern uint8_t g_USART1ReadDMABuff[USART1_DMA_READ_LENGTH + 4];
extern uint8_t g_USART2ReadDMABuff[USART2_DMA_READ_LENGTH + 4];
extern uint8_t g_USART6ReadDMABuff[USART6_DMA_READ_LENGTH + 4];

extern UART_HandleTypeDef g_typeUart1Handle;
extern UART_HandleTypeDef g_typeUart2Handle;
extern UART_HandleTypeDef g_typeUart6Handle;

extern DMA_HandleTypeDef g_typeDmaUart1Rx;
extern DMA_HandleTypeDef g_typeDmaUart2Rx;
extern DMA_HandleTypeDef g_typeDmaUart6Rx;




void vUart1Init(void);
void vUart2Init(void);
void vUart6Init(void);


void vUart1DMAInit(UART_HandleTypeDef *huart);
void vUart2DMAInit(UART_HandleTypeDef *huart);
void vUart6DMAInit(UART_HandleTypeDef *huart);


void vUartSendDatas(USART_TypeDef* USARTx, uint8_t *pucDatas, int32_t iLength);
void vUartSendStrings(USART_TypeDef* USARTx, char *pcStrings);

void vUartDMASendDatas(USART_TypeDef* USARTx, uint8_t *pucDatas, int32_t iLength);
void vUartDMASendStrings(USART_TypeDef* USARTx, char *pcStrings);


#endif /* DEVICESUART_H_ */
